Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LSP] Remove isFinalized from semantic tokens logic #60322

Closed
wants to merge 2 commits into from

Conversation

allisonchou
Copy link
Contributor

This property is currently only used by Razor - see dotnet/razor#6194 for details.
Will likely have to be dual inserted with the Razor PR

@@ -147,10 +147,12 @@ static SemanticTokensHelpers()

// If the full compilation is not yet available, we'll try getting a partial one. It may contain inaccurate
// results but will speed up how quickly we can respond to the client's request.
var frozenDocument = document.WithFrozenPartialSemantics(cancellationToken);
var semanticModel = await frozenDocument.GetRequiredSemanticModelAsync(cancellationToken).ConfigureAwait(false);
var isFinalized = document.Project.TryGetCompilation(out var compilation) && compilation == semanticModel.Compilation;
Copy link
Member

@dibarbet dibarbet Mar 22, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this because of the issue where the compilation out of proc is not necessarily finalized when the compilation in proc is? Or is checking for the compilation here just not correct?

Is this not an issue for regular C# tagger too @CyrusNajmabadi ? It looks like we use the compilation available event there as well, which I presume is coming from the in-proc version - https://sourceroslyn.io/#Microsoft.CodeAnalysis.EditorFeatures/Classification/Semantic/AbstractSemanticOrEmbeddedClassificationViewTaggerProvider.cs,65

@allisonchou
Copy link
Contributor Author

Superseded by #60484

@allisonchou allisonchou deleted the RemoveIsFinalizedLogic branch March 30, 2022 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants